package com.chang.order.feign;

import com.chang.common.utils.R;
import com.chang.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient("ware")
public interface WareFeignService {

    @PostMapping("ware/waresku/getBatchStock")
    Map<Long, Integer> getBatchStock(@RequestBody List<Long> skuIds);


    @PostMapping("ware/waresku/lock/order")
    R orderLockStock(@RequestBody WareSkuLockVo lockVo);
}
